package com.tender.dtos;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class IndexOrderDTO {

    /*************** SbcShipDataEntity start ******************/
    @Schema(description = "中文船名")
    private String shipName;

    @Schema(description = "进口航次")
    private String imVoyage;

    @Schema(description = "出口航次")
    private String exVoyage;
    /*************** SbcShipDataEntity end ******************/

    /*************** YardUnitEntity start ******************/
    @Schema(description = "船航次ID")
    private String shipVisitId;

    @Schema(description = "箱号")
    private String unitNo;

    @Schema(description = "箱ID/箱贞")
    private String unitVisitId;

    @Schema(description = "装货港代码")
    private String polCode;

    @Schema(description = "装货港名称")
    private String polName;

    @Schema(description = "卸货港代码")
    private String podCode;

    @Schema(description = "卸货港名称")
    private String podName;

    @Schema(description = "目的港代码")
    private String finalPodCode;

    @Schema(description = "目的港名称")
    private String finalPodName;

    @Schema(description = "到港时间 / 实际到达时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date arriveTime;

    @Schema(description = "离港时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date departTime;

    @Schema(description = "箱站代码")
    private String cfsCode;

    @Schema(description = "危险品标志")
    private String isHazard;

    @Schema(description = "危险品分类")
    private String imdgClassCode;

    @Schema(description = "辐射标记")
    private String radiateMark;

    @Schema(description = "箱尺寸")
    private String unitSizeCode;

    @Schema(description = "箱类型")
    private String unitTypeCode;

    @Schema(description = "尺寸箱型")
    private String unitSizeType;

    @Schema(description = "空重标志")
    private String emptyFullMark;

    @Schema(description = "箱毛重")
    private BigDecimal unitGrossWgt;

    @Schema(description = "箱皮重")
    private BigDecimal unitTareWgt;

    @Schema(description = "过磅重量")
    private BigDecimal unitScaleWgt;

    @Schema(description = "箱ISO代码")
    private String unitIsoCode;

    @Schema(description = "最大载重")
    private BigDecimal deadWeight;

    @Schema(description = "立方容积")
    private String unitCapacity;

    @Schema(description = "堆场位置")
    private String unitPosition;

    @Schema(description = "堆场区号")
    private String cyNo;

    @Schema(description = "堆场贝号")
    private String bayNo;

    @Schema(description = "堆场排号")
    private String rowNo;

    @Schema(description = "堆场层号")
    private String tierNo;

    @Schema(description = "校验码")  // 取箱号最后一位
    private String checkCode;

    @Schema(description = "箱况等级")
    private String unitClassify;

    @Schema(description = "在场停时")
    private Integer presenceHours;

    @Schema(description = "VGM重量")
    private BigDecimal unitVgmWgt;

    @Schema(description = "铅封号1")
    private String sealNo1;

    @Schema(description = "铅封号2")
    private String sealNo2;

    @Schema(description = "铅封号3")
    private String sealNo3;

    @Schema(description = "铅封号4")
    private String sealNo4;

    @Schema(description = "入港工具类型")
    private String inCarrierMode;

    @Schema(description = "出港工具类型")
    private String outCarrierMode;

    @Schema(description = "流向类别")
    private String unitCategory;

    @Schema(description = "进出口")
    private String impExpMark;

    @Schema(description = "进场时间/入堆时间")  // 箱子进场时间，入堆场
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date inYardTime;

    @Schema(description = "出场时间")  // 箱子出场时间，出堆场
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date outYardTime;

    @Schema(description = "箱公司代码")
    private String unitOperatorCode;

    @Schema(description = "箱公司名称")
    private String unitOperatorName;

    @Schema(description = "设定温度")
    private String tempSet;

    @Schema(description = "预提标志")
    private String isReserve;

    @Schema(description = "锁箱标志")
    private String isHold;

    @Schema(description = "残损标志")
    private String isDamage;

    @Schema(description = "商检标志")
    private String isCiqCheck;

    @Schema(description = "海关放行")
    private String isCustomsReleased;

    @Schema(description = "堆存天数")
    private Integer storageDays;

    @Schema(description = "箱状态类型")
    private String unitStateType;

    @Schema(description = "箱状态")
    private String unitState;

    @Schema(description = "箱状态名称")
    private String unitStateName;

    /*************** YardUnitEntity end ******************/

    /*************** PortCntrEntity start ******************/
    @Schema(description = "箱号")
    private String cntr;

    @Schema(description = "提单号")
    private String billNo;

    @Schema(description = "船号")
    private String shipNo;
    /*************** PortCntrEntity end ******************/

    /*************** ShipVisitEntity start ******************/
    @Schema(description = "上一港")
    private String lastPortCode;

    @Schema(description = "上一港名称")
    private String lastPortName;

    @Schema(description = "上一港国家英文缩写")
    private String lastPortCountryCode;

    @Schema(description = "下一港")
    private String nextPortCode;

    @Schema(description = "下一港名称")
    private String nextPortName;

    @Schema(description = "预计到港时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date eta;

    @Schema(description = "预计离港时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date etd;

    @Schema(description = "预计靠泊时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date etb;

    @Schema(description = "预计离泊时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date etu;

    @Schema(description = "确报到港时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date dta;

    @Schema(description = "抵锚时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date rta;

    @Schema(description = "实际靠泊时间 / 实际到港时间 / 船舶靠泊时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date rtb;

    @Schema(description = "实际离港时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date rtd;

    @Schema(description = "抵港艏吃水")
    private BigDecimal arrivalBowDraft;

    @Schema(description = "抵港艉吃水")
    private BigDecimal arrivalSternDraft;

    @Schema(description = "离港艏吃水")
    private BigDecimal departBowDraft;

    @Schema(description = "离港艉吃水")
    private BigDecimal departSternDraft;

    @Schema(description = "卸船开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date discBeginTime;

    @Schema(description = "装船开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date loadBeginTime;

    @Schema(description = "贸易性质")
    private String tradeType;

    @Schema(description = "卸船结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date discEndTime;

    @Schema(description = "装船结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date loadEndTime;

    @Schema(description = "锚地代码")
    private String anchorCode;

    @Schema(description = "靠泊记录ID")
    private String shipVisitBerthId;

    @Schema(description = "码头ID")
    private String facilityId;

    /*************** ShipVisitEntity end ******************/

    @Schema(description = "停靠位置")
    private String berthLocation = "烟台港国际码头";  // TODO 字典 - YTGJ

    @Schema(description = "箱子尺寸和类型")
    private String boxSizeAndType;

    @Schema(description = "提单号状态")
    private String billState;

    @Schema(description = "装船作业计划总箱子")
    private int loadPlanTotal;

    @Schema(description = "装船作业已完成总箱子")
    private int loadCompletedTotal;

    @Schema(description = "卸船作业计划总箱子")
    private int unloadPlanTotal;

    @Schema(description = "卸船作业已完成总箱子")
    private int unloadCompletedTotal;

    @Schema(description = "岸边作业时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date quayWorkTime;

    @Schema(description = "海关放行时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date releaseTime;

    @Schema(description = "拖车作业时间 / 入堆时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date workTime;

    @Schema(description = "受理时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date acceptanceTime;

    @Schema(description = "mmsi")
    private String mmsi;

    @Schema(description = "船公司-名称")
    private String shipLineName;

}
